/**
 * Copyright (C), 2019-2020, 宇信融汇
 * FileName: ThisDemo
 * Author:   xbliu
 * Date:     2020/6/16 17:10
 * Description: This关键字
 * History:
 * <author>          <time>          <version>          <desc>
 * xbliu           修改时间           版本号              描述
 */
package c_002;

/**
 * @Classname ThisDemo
 * @Description TODO
 * @Date 2020/6/16 17:10
 * @Created by xbliu
 */
public class ThisDemo {

    String name;
    int age;

    public ThisDemo() {
    }

    public ThisDemo(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void test1() {
        System.out.println("test1");
        //this.test2("hehe");
    }

    public void test2(String name) {
        System.out.println("test2");
        test1();
        System.out.println(name);
        System.out.println(this.name);
    }

    public static void main(String[] args) {
        ThisDemo t = new ThisDemo("张三", 11);
        System.out.println(t.name);
        System.out.println(t.age);
        t.test2("lisi");

    }

}
